﻿using Coldairarrow.Entity.BaseConfig;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.BaseConfig
{
    public interface IBase_SysConfigBusiness
    {
        Task<PageResult<Base_SysConfig>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<Base_SysConfig> GetTheDataAsync(string id);
        Task AddDataAsync(Base_SysConfig data);
        Task UpdateDataAsync(Base_SysConfig data);
        Task DeleteDataAsync(List<string> ids);
        Task<List<ConfigTypeDTO>> GetConfigList();
        Task SetConfig(List<ConfigTypeDTO> input);
    }

    public class ConfigTypeDTO
    { 
         public string TypeName { set; get; } 
        
         public List<ConfigDTO> Configs { get; set; }
    }

    public class ConfigDTO
    {
        /// <summary>
        /// Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Note { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        public string Value { get; set; }
    }

    public class TConfigDTO
    {
        /// <summary>
        /// Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 键
        /// </summary>
        public string Key { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        public string Value { get; set; }
    }

  
}